﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;

namespace BDSim
{
    public class Bool2Visible : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Visibility visible = Visibility.Visible;
            switch ((bool)value)
            {
                case true:
                    visible = Visibility.Visible;
                    break;
                case false:
                    visible = Visibility.Collapsed;
                    break;
                default:
                    break;
            }
            return visible;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
